﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Editor.ascx.cs" Inherits="WebAsp.Admin.News.Editor" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<div class="creat">
    <div>
        <span class="creat">Thể loại:</span> 
        <asp:DropDownList ID="cbbCategory" runat="server" Width="306px">
        </asp:DropDownList>
    </div>
    <div>
        <span class="creat">Ảnh đại diện:</span>
        <asp:TextBox ID="txtImgUrl" runat="server" Width="230px"></asp:TextBox>
        <input type="button" id="btnSelectImg" value="Chọn ..." />
    </div>
    <div>
        <span class="creat">Tiêu đề:</span> 
        <asp:TextBox ID="txtTitle" runat="server" Width="700px"></asp:TextBox>  
    </div>
    <div>
        <span class="creat">Tóm tắt:</span> 
        <asp:TextBox ID="txtSummary" runat="server" Width="700px" EnableTheming="True" 
            Height="70px" TextMode="MultiLine"></asp:TextBox>
    </div>
    <div>
        <span class="editor">Nội dung:</span>
        <FCKeditorV2:FCKeditor ID="txtContent" runat="server" Height="400px" 
            Width="705px" BasePath="/Admin/fckeditor/">
        </FCKeditorV2:FCKeditor>  
    </div>
</div>

<script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="/ckfinder/ckfinder.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#btnSelectImg").click(function () {
            var finder = new CKFinder();
            finder.selectActionFunction = function (fileUrl) {
                $('#<%=txtImgUrl.ClientID %>').val(fileUrl);
            };
            finder.popup();
        });
    });
</script>